import java.util.Scanner;
public class 密码 {
	public static void main(String args[]) {
		int a=20175126;
		int i;
		System.out.println("请输入密码：");
		Scanner scanner = new Scanner(System.in);
		int b=scanner.nextInt();
		for(i=10;i>0;i--) {
			System.out.printf("密码错误...你还有%d次机会\n"+
					   "请重新输入密码:\n",i);
			Scanner scanner2 = new Scanner(System.in);
		       	b=scanner2.nextInt();
			if(b==a) {
				System.out.println("密码正确");
				break;
		}
	}
	if(b!=a)
		System.out.println("密码错误..你没有机会了\n"+" 再见！");
	}
}


